<!doctype html>    
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Users</title>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript">
    function ChangeColor(tableRow, highLight)
    {
		if (highLight)
		{
			//tableRow.style.backgroundColor = '#dcfac9';
			tableRow.style.cursor='hand';
		}
		else
		{
			//tableRow.style.backgroundColor = 'white';
			tableRow.style.cursor='pointer';
		}
	}

	function DoNav(theUrl)
	{
		document.location.href = theUrl;
	}
</script>
</head>
<body>
	<h1 align="center">Users</h1>
	<table>
	<thead>
		<tr>
			<th>Firstname</th>
			<th>Lastname</th>
			<th>Email</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<?php
			foreach ($users as $row) 
			{
				echo '<tr onMouseOver="style.cursor=\'pointer\'" onclick="DoNav(\'' . base_url() . 'index.php/users/view_user?&id=' . $row->user_id . '\');">';
				echo '<td>' . $row->user_firstname . '</td>';
				echo '<td>' . $row->user_lastname . '</td>';
				echo '<td>' . $row->user_email . '</td>';
				echo '<td align="center"><a class="btn btn-small btn-info" title="Edit" href="' . base_url() . 'index.php/users/update_user?&id=' . $row->user_id . '">Edit</a></td>';
				//echo '<td align="center"><a class="btn btn-small btn-danger" title="Delete" href="' . base_url() . 'index.php/employee/delete_employee?&id=' . $row->employee_id . '"><i class="icon-trash icon-white"></i></a></td>';
				echo '</tr>';
			}
		?>
	</tbody>
	</table>
</body>
</html>
